package com.pan.entity;

import java.util.HashMap;
import java.util.Map;

public class HumbleHttpRequest {
    private String method;
    private String url;
    private Map<String,String> httpAttribute;
    private Map<String,String> urlParameter;
    {
        httpAttribute = new HashMap<>();
        urlParameter = new HashMap<>();
    }

    @Override
    public String toString() {
        return "HumbleHttpRequest{" + "\n" +
                "method='" + method + '\'' + "\n" +
                ", url='" + url + '\'' +"\n" +
                ", httpAttribute=" + httpAttribute + "\n" +
                ", urlParameter=" + urlParameter + "\n" +
                ", body='" + body + '\'' + "\n" +
                '}';
    }

    private String body;

    public String getMethod() {
        return method;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public Map<String, String> getHttpAttribute() {
        return httpAttribute;
    }

    public Map<String, String> getUrlParameter() {
        return urlParameter;
    }

    public void addUrlParameter(String key,String value){
        urlParameter.put(key,value);
    }
    public void addHttpAttribute(String key,String value){
        httpAttribute.put(key,value);
    }

    public String getBody() {
        return body;
    }

    public void setBody(String body) {
        this.body = body;
    }
}
